/**
 * 
 */
package com.snl.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * @author Bryan Liu
 *
 */

@Entity
@Table(name="PARTY")
public class Party {
	
	@Id
	@Column(name="PARTY_ID")
	private int id;
	
	@Column(name="NAME")
	private String name;
	
	@Column(name="START_DATE")
	private Date startDate;
	
	@Column(name="NOTE")
	private String note;

	@OneToMany(mappedBy="party",cascade=CascadeType.ALL, fetch=FetchType.LAZY)
	private List<UserPartyLink> userPartyLinks;
	
	
	
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the startDate
	 */
	public Date getStartDate() {
		return startDate;
	}

	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	/**
	 * @return the note
	 */
	public String getNote() {
		return note;
	}

	/**
	 * @param note the note to set
	 */
	public void setNote(String note) {
		this.note = note;
	}

	/**
	 * @return the userPartyLinks
	 */
	public List<UserPartyLink> getUserPartyLinks() {
		return userPartyLinks;
	}

	/**
	 * @param userPartyLinks the userPartyLinks to set
	 */
	public void setUserPartyLinks(List<UserPartyLink> userPartyLinks) {
		this.userPartyLinks = userPartyLinks;
	}
	
	
}
